<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div id="register"><form name="form1" method="post" action="" class="step2">
    <div class="about_help">
    	<div>{{$showtip}}</div>
    </div>
    <div class="step_info">
    	<span class="stepstatic1"><span class="white">注册用户</span></span>
    	<span class="stepstatic2"><span class="white">添加网站</span></span>
    	<span class="stepstatic3">完成信息</span>
    </div>
    <div class="register_tips"><span class="xing">*</span>为必填写信息</div>
    <div class="data">
    <table>
        <tr>
        	<th width="150"><span class="xing">*</span>网站类别：</th>
            <td width="80"><select onchange="change_dir(this.value)" id="maxid" name="zbelongid"></select></td>
        	<th width="150" align="right"><span class="xing">*</span>网站类别：</th>
            <td width="324"><select style="float:left;" id="minid" name="zbelongid"></select>
            <span id="zbelongtips">{{$zbelongid_error}}</span>
            </td>
        </tr>
<script language=JavaScript>
var onecount_yi;
onecount_yi=0;
subcat_yi = new Array();
count_yi = 0;
subcat_yi[0] = new Array("6700B0700B101407208A","一级类别");
{{section name=a loop=$webtype_max}}
subcat_yi[{{$smarty.section.a.iteration }}] = new Array("{{$webtype_max[a].zbelongid}}","{{$webtype_max[a].zname}}");
{{/section}}
onecount_yi = subcat_yi.length;
function set_max_dir(selected){
	var obj;
	obj = $("maxid");
	obj.length = 0;
	var i;
	for (i=0;i < onecount_yi; i++){
		obj.options[obj.length] = new Option(subcat_yi[i][1], subcat_yi[i][0]);
		if (selected && selected == subcat_yi[i][0]){
			obj.options[obj.length-1].selected = true; 
        }
    }    
}
var onecount_er;
onecount_er=0;
subcat_er = new Array();
count_er = 0;
subcat_er[0] = new Array("6700B0700B101407208A","二级类别","6700B0700B101407208A");
{{section name=a loop=$webtype_min}}
subcat_er[{{$smarty.section.a.iteration }}] = new Array("{{$webtype_min[a].zbelongid}}","{{$webtype_min[a].zname}}","{{$webtype_min[a].zparentid}}");
{{/section}}
onecount_er = subcat_er.length;

function change_dir(locationid,selected){
	var obj;
	obj=$("minid");
	obj.length=0;
	var i;
    for (i=0;i < onecount_er; i++){
		if (subcat_er[i][2] == locationid){
			obj.options[obj.length] = new Option(subcat_er[i][1], subcat_er[i][0]); 
			if(selected && selected == subcat_er[i][0]){
        		obj.options[obj.length-1].selected = true; 
			}
        }
    }
}
set_max_dir({{$maxbelongid}});
change_dir($("maxid").value{{if $zbelongid}},{{$zbelongid}}{{/if}});
</script>
    	<tr>
        	<th><span class="xing">*</span>网站名称：</th>
            <td colspan="3"><input id="zsitename" type="text" class="input_3" name="zname" value="{{$zname}}" />
            	<span id="sitenametips">{{$zname_error}}</span>
            </td>
        </tr>
        <tr>
        	<th><span class="xing">*</span>链接地址：</th>
            <td colspan="3"><input type="text" id="siteurl" class="input_4" name="zurl" value="{{$zurl}}" />
            	<span id="siteurltips">{{$zurl_error}}</span>
            </td>
        </tr>
        <tr>
        	<th>网站标题：</th>
            <td colspan="3"><input type="text" class="input_5" name="ztitle" value="{{$ztitle}}" /></td>
        </tr>
        <tr>
        	<th>网站关键字：</th>
            <td colspan="3"><input type="text" class="input_5" name="zkeyword" value="{{$zkeyword}}" /></td>
        </tr>
        <tr>
        	<th><span class="xing">*</span>网站简介：</th>
            <td colspan="3"><textarea id="siteinfo" class="textarea2" name="zcontent">{{$zcontent}}</textarea>
            	<span id="siteinfotips">{{$zcontent_error}}</span>
            </td>
        </tr>
    </table>
    <div class="botton">
    	<input id="submit" type="submit" value="提交" />
        <input type="reset" value="重置" />
    </div>
    </div>
</form></div>
